***************************************************************************** BMAKE 1.0 BASIC language make utility Raymond W. Marron - HOMONCULOUS PROGRAMMING - Mesa, AZ ***************************************************************************** OVERVIEW: BMAKE is a utility for BASIC programmers. It makes the compiling and linking stage of your programming faster and easier. BMAKE works by reading a makefile (a.k.a. response file) that contains the names of your source files. You may specify compiler options that apply to all the files, or specify different or additional options on a file by file basis. BMAKE then compares the date and time stamp of your source files to those of the associated object files. It doesn't bother to recompile a module if the object file is newer. Should the compiler detect an error in your source, BMAKE will stop execution so you can see what the errors were before they scroll off the screen. When the compiler work is finished, BMAKE can then issue a command or commands to start your linker, library manager, or run a batch file that contains even more commands! COMMAND LINE PARAMETERS: The most basic usage of BMAKE is the program name followed by the name of your makefile. If you do not specify an extension for the makefile, ".BMK" is assumed. Examples: BMAKE MYFILE (Assumes MYFILE.BMK) BMAKE MAKEFILE.TXT (Explicitly named) By default, BMAKE can handle up to 100 object/source comparisons and 10 other commands per makefile. If you need to increase these amounts, you can add the following switches to the command line AFTER the name of the makefile: /F:# Where # is the maximum number of source/object Files to process. /C:# Where # is the maximum number of other Commands to process. Example: BMAKE MYFILE.BMK /F:150 /C:25 These switches may also be used to *reduce* the default values if you are only processing a few files. Reducing the values should not be neccessary. MAKEFILE SYNTAX: BMAKE files are plain ASCII text files. There are no limits to what you can call your file (other than those imposed by DOS). To help you identify your makefiles, it is recommended that you give them extensions of ".BMK". BMAKE commands are not case-sensitive, although any compiler options or run command parameters that you specify (see below) are passed to their respective programs just as you typed them in the event that these other programs are case-sensitive. Comments: You can include comments in your makefile by starting any line with an apostrophe ('). This makes it easy to identify different sections of your makefile or to comment-out certain source files that you do not wish to compile right now. In-line comments (comments that follow an actual command on the same line) are also supported. Examples: ' This line will be ignored by BMAKE! MYPROG.OBJ | MYPROG.BAS 'From here on will be ignored also! Specifying a Compiler: The bulk of the makefile will be devoted to comparing your source code to the object files. But first, you need to tell BMAKE the name of your compiler and what options you wish to apply to all the modules. BMAKE assumes that your compiler is called "BC.EXE" and resides in the current directory or one that is accessible through the DOS PATH environment variable. If this is not the case, put the following command at the top of your makefile: COMPILER: ^ This colon marks the end of the keyword & start of the value. Example: COMPILER: C:\QB45\BIN\BC (Do not include the extension) Whatever BMAKE finds after the first colon following the keyword is what it will accept as the value for that option. Any spaces between the colon and the value are ignored. This is true for all BMAKE keyword commands. Please note that BMAKE has only been tested with the BC compiler. If you use a different compiler and it has a different command line syntax than BC.EXE, BMAKE may not work. BMAKE calls the compiler like so: [options], ; Example: BC MYPROG.BAS /O/T/C:512, MYPROG.OBJ; Specifying Compiler Options: You may specify compiler options that will apply to all files in the list. You can override or add to these options on a file by file basis. If there are a number of options that will apply to most or all of your source files, issue this command in your makefile: OPTIONS: Example: OPTIONS: /O/T/C:512 Object/Source file comparisons: Once you have identified your compiler and any global compiler options to BMAKE, you will begin to list your object and source files that are to be compared. The comparison lines take the following form: | [alternate compiler options] Example: MYPROG.OBJ | MYPROG.BAS &/V The pipe character (|) between the filenames identifies this as a comparison line to BMAKE. The object file should be listed on the left, and the source on the right. If you don't specify extensions, BMAKE assumes ".OBJ" and ".BAS" respectively. The object file may have a different name than the source file. You may also specify extended pathnames on the comparison line. Example: C:\OBJ\MYPROG2 | C:\SOURCE\MYPROG (.OBJ & .BAS extensions assumed) BMAKE compares these two files, and if the source has been updated since the object file was created (or if the object file doesn't exist), it will (re)compile the source file. If an extended path was specified for the object file, the new object file will be placed in that same directory. Alternate Compiler Options: Additional or alternate compiler options may be specified on any of the comparison lines. These options must follow the source filename and must be separated from it by at least one space. If you want to specify options in addition to the global options, prefix them with an ampersand (&). If you want to list options to be used instead of the global options, prefix them with an exclamation point (!). Any spaces between the ampersand/exclamation and the text of the new options WILL BE INCLUDED when sent to the compiler. Some compilers require spaces between the options, some don't. If you want additional options: MYPROG.OBJ | MYPROG.BAS & /S /X (Will be separated from the ^ global options by a space.) If you want alternate options: MYPROG.OBJ | MYPROG.BAS !/V (Will be used instead of the global options.) Followup Commands: When your object/source comparisons are finished, you can invoke your linker or library manager to process the new objects. Use the keyword "COMMAND:" followed by your command just like you would type it at the DOS prompt or in a batch file. If you are calling a batch file, you must use the word "CALL" before the batch file's name or no further commands will be carried out. BMAKE actually turns these COMMANDs into a batch file! The main benefit of including your commands in the makefile rather than a separate batch file is that you only need to maintain one file. Examples: COMMAND: LINK @MYPROG.LNK COMMAND: CALL MYBATCH (Calling a batch file) COMMAND: LIB MYLIB.LIB -+ NEWOBJ.OBJ; Note: Because the pipe character is used to identify comparison lines, do not include this character in your COMMANDs. If you must use the pipe in a command, place it into a batch file and call the batch file. ***************************************************************************** BMAKE is one of many freeware releases from HOMONCULOUS PROGRAMMING. If you like/don't like it and wish to send comments to the author, please feel free to send me E-mail via CompuServe at 74220,2344. I would be happy to hear from you. ***************************************************************************** *** End of File BMAKE.TXT